package com.huluobo.a2207douyindemo.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2207douyindemo.R;
import com.huluobo.a2207douyindemo.utils.ImageUtils;
import com.huluobo.base.bean.VideoBeanResult;

/**
 * Created by LC on 2024/9/28.
 */
public class HomeVideoAdapter extends BaseQuickAdapter<VideoBeanResult.VideoBean, BaseViewHolder> {
    public HomeVideoAdapter() {
        super(R.layout.item_home_video);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, VideoBeanResult.VideoBean videoBean) {
        ImageUtils.getInstance().loadImage(getContext(), videoBean.getVideomainimg(),
                baseViewHolder.getView(R.id.item_home_video_iv));
        baseViewHolder.setText(R.id.item_home_video_name_tv, videoBean.getCaption());
    }
}
